#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	char arr[] = "hello world!";
	memset(arr, '#', 5);
	printf("%s\n", arr);
	return 0;
}
int main9()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,0 };
	int arr2[20] = { 0 };
	memcpy(arr2, arr1, 3 * sizeof(int));
	printf("arr2:");
	for (int i = 0; i < 10; i++)
	{
		printf("%d ", arr2[i]);
	}
	return 0;
}
int main8()
{
	printf("%s\n", strstr("ababdefabd", "abd"));
	return 0;
}
int main7()
{
	char arr1[] = "abcdef";
	char arr2[20] = "0";
	strncpy(arr2, arr1, 3);
	printf("arr2:%s\n",arr2);
	return 0;
}

int main6()
{
	char arr1[] = "abcdef";
	char arr2[] = "abq";
	char arr3[] = "abq";
	int ret1 = 0;
	int ret2 = 0;
	int ret3 = 0;
	ret1 = strcmp(arr1, arr2);
	ret2 = strcmp(arr2, arr1);
	ret3 = strcmp(arr2, arr3);
	printf("arr1,arr2:%d\narr2,arr1:%d\narr2,arr3:%d\n", ret1, ret2, ret3);
	return 0;
}
int main5()
{
	char arr1[20] = "hello ";
	char arr2[] = "world";
	strcat(arr1, arr2);
	printf("%s\n", arr1);
	return 0;
}
//int main4()
//{
//	char arr1[] = "abcdef";
//	char arr2[20] = "0";
//	strcpy(arr2, arr1);
//	printf("arr2:%s\n",arr2);
//	return 0;
//}
//int main3()
//{
//	int ret = 0;
//	char arr[] = "abcdef";
//	ret = strlen(arr);
//	printf("%d\n", ret);
//	return 0;
//}
//int main2()
//{
//	char ch = 'a';
//	int ret = 0;
//	ch = toupper(ch);
//	printf("%c\n", ch);
//	return 0;
//}
//int main1()
//{
//	char c1 = 'a';
//	char c2 = 'A';
//	int ret1 = 0;
//	int ret2 = 0;
//	ret1 = isupper(c1);
//	ret2 = isupper(c2);
//	printf("a:%d\n", ret1);
//	printf("A:%d\n", ret2);
//	return 0;
//}
